Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-archival relay #827

Merged
merged 12 commits into from
Dec 16, 2024
Merged

non-archival relay #827

merged 12 commits into from
Dec 16, 2024

Conversation

whyrusleeping
Copy link
Collaborator

real jank right now, but doesnt keep all the repo data, just does basic event validation

@@ -1155,6 +1155,7 @@ func (bgs *BGS) handleRepoTombstone(ctx context.Context, pds *models.PDS, evt *a
}).Error; err != nil {
return err
}
u.SetTombstoned(true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an irrelevant fix of some other thing

pds/server.go Outdated
if err != nil {
return nil, err
}
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the dead code stays, leave a TODO about how we might bring it back and what for?

@@ -54,12 +54,19 @@ func BenchmarkRepoMgrCreates(b *testing.B) {
b.Fatal(err)
}

cs, err := carstore.NewCarStore(cardb, []string{cspath})
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// TODO: refactor benchmark into core function which takes a carstore factory and make two benchmarks for standard file carstore and non-archival carstore

@@ -69,7 +69,7 @@ func TestLoadNewRepo(t *testing.T) {
}
}

func testCarstore(t *testing.T, dir string) carstore.CarStore {
func testCarstore(t *testing.T, dir string, archive bool) carstore.CarStore {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add TODO comment about making some tests with archive=false ?

@@ -606,7 +606,11 @@ func (ds *DeltaSession) CloseWithRoot(ctx context.Context, root cid.Cid, rev str
case *FileCarStore:
return ocs.writeNewShard(ctx, root, rev, ds.user, ds.seq, ds.blks, ds.rmcids)
case *NonArchivalCarstore:
return nil, ocs.updateLastCommit(ctx, ds.user, rev, root)
slice, err := blocksToCar(ctx, root, rev, ds.blks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case on type should probably be a new interface method that both implement

@audreyt
Copy link
Contributor

audreyt commented Dec 13, 2024

Fixed the lint error over at #876

@whyrusleeping
Copy link
Collaborator Author

Thanks @audreyt !

@whyrusleeping whyrusleeping merged commit 86719b0 into main Dec 16, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants